package com.yuyou.tas.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yuyou.tas.service.api.admin.entity.AuthRole;
import com.yuyou.tas.util.bean.Pagination;

@Mapper
public interface AuthRoleMapper {
    int deleteByPrimaryKey(String id);

    int insert(AuthRole authRole);

    AuthRole selectByPrimaryKey(String id);

    AuthRole selectByRoleName(String roleName);
    
    AuthRole selectUniByRoleType(int roleType);

    int updateByPrimaryKeySelective(AuthRole record);

    int updateByPrimaryKeyWithBLOBs(AuthRole record);

    int findAuthRolePageCount(Pagination<AuthRole> p);

    List<AuthRole> findAuthRolePageList(Pagination<AuthRole> p);

    List<AuthRole> findAuthRoleList(@Param(value = "isSystem") Boolean isSystem, @Param(value = "authOrganizationId") Long authOrganizationId);

    List<AuthRole> findAuthRoleByUserId(Long authUserId);

    List<AuthRole> findAuthRoleListForOrgan();
    
    /**
     * 批量查询角色
     * @param ids
     * @return
     */
    List<AuthRole> findByIds(@Param(value = "ids") List<Long> ids);
}